/**
 * 
 */
package com.lanswon.controller;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.lanswon.common.util.StringUtil;
import com.lanswon.service.AdminService;
import com.lanswon.service.UserService;

/**
 * @author lanswon
 *
 */
@Controller
public class HtmlController {
	@Autowired
	AdminService adminService;
	/*@Autowired
	UserService userService;*/

	@RequestMapping("/*.html")
	public String login(HttpServletRequest request) throws IOException {
		//Long userId = (Long) request.getSession().getAttribute("userId");
		
		//获取URL
		StringBuffer path =request.getRequestURL();
		String str =path.substring(path.lastIndexOf("/")+1, path.indexOf(".html"));		
		
		//返回转化路径
		if("fwwd".equals(str)) {
			return "front/fwwd/"+str;
		}else if("hxgn-detailed".equals(str)) {
			return "front/problem/"+str;
		}else {		
			return "front/"+str;
		}
		
	}
}